home *** CD-ROM | disk | FTP | other *** search
- -- card: 3330 from stack: in
- -- bmap block id: 0
- -- flags: 0000
- -- background id: 2106
- -- name:
-
-
- -- part 1 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=32 top=97 right=119 bottom=130
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Next Card
- ----- HyperTalk script -----
- on mouseUp
- go to next card
- end mouseUp
-
-
-
-
- -- part 2 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=31 top=135 right=157 bottom=129
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Prev Card
- ----- HyperTalk script -----
- on mouseUp
- go to previous card
- end mouseUp
-
-
-
-
- -- part 3 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=32 top=172 right=193 bottom=131
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: First Card
- ----- HyperTalk script -----
- on mouseUp
- go to first card
- end mouseUp
-
-
-
-
- -- part 4 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=32 top=207 right=229 bottom=130
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Last Card
- ----- HyperTalk script -----
- on mouseUp
- go to last card
- end mouseUp
-
-
-
-
- -- part 5 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=32 top=244 right=266 bottom=130
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Any Card
- ----- HyperTalk script -----
- on mouseUp
- go to any card
- end mouseUp
-
-
-
-
- -- part 6 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=141 top=97 right=119 bottom=239
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Return
- ----- HyperTalk script -----
- on mouseUp
- pop card
- end mouseUp
-
-
-
-
- -- part 7 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=143 top=135 right=157 bottom=241
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Home
- ----- HyperTalk script -----
- on mouseUp
- visual effect iris close
- go home
- end mouseUp
-
-
-
-
- -- part 8 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=145 top=207 right=229 bottom=243
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Dial
- ----- HyperTalk script -----
- on mouseUp
- get the selection
- if it is empty then ask "Dial what number?"
- if it is not empty then
- push this card
- visual effect zoom open
- go to stack "Phone"
- dial it
- pop card
- end if
- end mouseUp
-
-
-
- -- part 9 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=144 top=245 right=267 bottom=242
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Show Cards
- ----- HyperTalk script -----
- on mouseUp
- show all cards
- end mouseUp
-
-
-
- -- part 16 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=144 top=171 right=193 bottom=242
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Help
- ----- HyperTalk script -----
- on mouseUp
- help
- end mouseUp
-
-
-
-
- -- part 17 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=256 top=135 right=157 bottom=351
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Find
- ----- HyperTalk script -----
- on mouseUp
- doMenu "Find..."
- end mouseUp
-
-
-
- -- part 19 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=256 top=97 right=119 bottom=354
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Sort
- ----- HyperTalk script -----
- on mouseUp
- answer "Sort all cards of this stack according to:" with "First Name" or "Last Name" or "Cancel"
- if it is "First Name"
- then sort by first word of first line of field 1
- else if it is "Last Name"
- then sort by last word of first line of field 1
- end mouseUp
-
-
-
- -- part 33 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=258 top=171 right=192 bottom=353
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Import
- ----- HyperTalk script -----
- --Universal Import Button by Gary Bond
- --Copyright 1987 by Apple Computer, Inc.
- --Rev 3.1
-
- on MouseUp
- global CARDCOUNT,STARTCARD,LEVELMEMORY,HEADER
- put the userLevel into LEVELMEMORY
- set the userLevel to 5
- set lockMessages to true
- set lockScreen to true
- put the short id of this card into STARTCARD
- answer "Import text file as:" with "Data" or "Text" or "Cancel"
- if it is "Data" then ImportData
- else if it is "Text" then
- answer "Include HEADER information in fields?" with "Yes" or "No"
- put it into HEADER
- ImporText
- else CleanExit
- go to next card
- CleanExit "Compact"
- end MouseUp
-
- on ImporText
- global CARDCOUNT,STARTCARD,LEVELMEMORY,HEADER,FILENAME
- put 0 into CARDCOUNT
- repeat
- ask "Name or pathname of text file to import:" with FILENAME
- if it is empty then CleanExit
- if short name of this stack is not in it then exit repeat
- else answer "Can't import current stack!"
- end repeat
- put it into FILENAME
- set cursor to 4 -- use system watch cursor
- open file FILENAME
- repeat
- read from file FILENAME for 16384
- if it is empty and CARDCOUNT is 0 then
- answer "Could not find file:" && FILENAME with "OK"
- close file FILENAME
- CleanExit
- end if
- if it is empty then exit repeat
- put return after it
- if CARDCOUNT is 0 then
- doMenu "New Background"
- doMenu "New Field"
- set the name of last bkgnd field to "Import"
- else
- doMenu "New Card"
- end if
- add 1 to CARDCOUNT
- set the style of field "Import" to scrolling
- set rect of field "Import" to 0,20,512,342
- if HEADER is "Yes" then
- put "Characters:" && number of characters in it & return & return before it
- put "Lines:" && number of lines in it - 2 & return before it
- put "File:" && FILENAME & return before it
- put "Import card:" && CARDCOUNT & return before it
- end if
- put it into field "Import"
- end repeat
- close file FILENAME
- if HEADER is "Yes" then
- repeat until the short id of this card is STARTCARD
- put " of" && CARDCOUNT after line 1 of field "Import"
- go previous card
- end repeat
- else go card id STARTCARD
- end ImporText
-
- on ImportData
- global FILENAME,CARDCOUNT,STARTCARD,LEVELMEMORY,HEADER
- put empty into delimiters
- put 0 into CARDCOUNT
- put 0 into limit
- put 0 into fieldcount
- put 0 into nofields
- answer "Use Tab and Return as delimiters?" with "Yes" or "Other" or "Cancel"
- if it is "Yes" then put "9,13" into delimiters
- else if it is "Other" then
- repeat until it < 256 and it > 0
- ask "Enter an Ascii FIELD separator (0-255):" with 9
- if it is empty then CleanExit
- end repeat
- put it into item 1 of delimiters
- put 0 into it
- repeat until it < 256 and it > 0
- ask "Enter an Ascii RECORD separator (0-255):" with 13
- if it is empty then CleanExit
- end repeat
- put it into item 2 of delimiters
- else CleanExit
- if item 1 of delimiters is item 2 of delimiters then put 1 into nofields
- answer "Include header information in fields?" with "Yes" or "No"
- put it into HEADER
- repeat
- ask "Name or pathname of text file to import:" with FILENAME
- if it is empty then CleanExit
- else if short name of this stack is not in it then exit repeat
- else answer "Can't import current stack!"
- end repeat
- put it into FILENAME
- set cursor to 4
- open file FILENAME
- repeat
- read from file FILENAME until numToChar of item 2 of delimiters
- if it is empty and CARDCOUNT is 0 then
- answer "Could not find file:" && FILENAME with "OK"
- close file FILENAME
- CleanExit
- end if
- if it is empty then exit repeat
- if charToNum(last character of it) is not item 2 of delimiters then
- put item 2 of delimiters into temp
- if temp is 9 then put "Tab" into temp
- if temp is 13 then put "Return" into temp
- answer "Can't find record delimiter:" && temp with "OK"
- close file FILENAME
- CleanExit
- end if
- if (numToChar of item 1 of delimiters) is not in it and nofields is 0 then
- put item 1 of delimiters into temp
- if temp is 9 then put "Tab" into temp
- if temp is 13 then put "Return" into temp
- answer "Can't find field delimiter:" && temp with "Help" or "OK"
- if it is "Help" then
- answer "Use double record delimiters for records..." with "Continue"
- answer "with no field delimiters. Example: 13 & 13" with "OK"
- end if
- close file FILENAME
- CleanExit
- end if
- repeat until "," is not in it
- put numToChar(7) into character offset(",",it) of it
- end repeat
- if nofields is 0 then
- put numToChar(item 1 of delimiters) & numToChar(item 1 of delimiters) into check
- repeat until check is not in it
- put numToChar(item 1 of delimiters) & quote & quote & numToChar(item 1 of delimiters) into char offset(check,it) to offset(check,it) + 1 of it
- end repeat
- put numToChar(item 1 of delimiters) & numToChar(item 2 of delimiters) into check
- repeat until check is not in it
- put numToChar(item 1 of delimiters) & quote & quote & numToChar(item 2 of delimiters) into char offset(check,it) to offset(check,it) + 1 of it
- end repeat
- repeat until (numToChar of item 1 of delimiters) is not in it
- put "," into character offset((numToChar of item 1 of delimiters),it) of it
- end repeat
- end if
- put empty into last character of it
- if CARDCOUNT is 0 then doMenu "New Background"
- else doMenu "New Card"
- add 1 to CARDCOUNT
- if nofields is 0 then put the number of items in it into limit
- else put nofields into limit
- repeat with count = 1 to limit
- if CARDCOUNT is 1 then
- add 1 to fieldcount
- if fieldcount < 125 then
- doMenu "New Field"
- set rect of last bkgnd field to 30,120,482,205
- else
- answer "No more fields can be created!" with "OK"
- Cleanexit "Compact"
- end if
- end if
- put "Field" & count into fieldname
- set name of bkgnd field (number of bkgnd fields) to fieldname
- set style of bkgnd field fieldname to scrolling
- If nofields is 0 and HEADER is "Yes" then
- put "Field" && count && "of" && the number of items in it & return into bkgnd field fieldname
- put "Record" && CARDCOUNT && "of file:" && FILENAME & return & return after bkgnd field fieldname
- end if
- if nofields is 0 then put item count of it after bkgnd field fieldname
- else put it after bkgnd field fieldname
- repeat until numToChar(7) is not in bkgnd field fieldname
- put "," into character offset(numToChar(7),bkgnd field fieldname) of bkgnd field fieldname
- end repeat
- end repeat
- choose browse tool
- end repeat
- close file FILENAME
- go card id STARTCARD
- end ImportData
-
- on CleanExit
- global LEVELMEMORY
- if param(1) is "Compact" then
- doMenu "Compact Stack"
- end if
- choose browse tool
- set the userLevel to LEVELMEMORY
- set lockScreen to false
- set lockMessages to false
- exit to hypercard
- end CleanExit
-
-
- -- part 34 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=258 top=207 right=230 bottom=354
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Export Text
- ----- HyperTalk script -----
- --Export Text Button by Gary Bond
- --Copyright 1987 by Apple Computer, Inc.
- --Rev 3.6
-
- On MouseUp
- global LEVELMEMORY,STARTCARD,FIELDNAMES,FILENAME
- put empty into FIELDNAMES
- put the userlevel into LEVELMEMORY
- set userLevel to 5
- set lockMessages to true
- put short id of this card into STARTCARD
- Dialog
- GetFilename
- OpenFile
- GetFieldData
- close file FILENAME
- CleanExit
- End MouseUp
-
- On GetFileName
- global FILENAME
- ask "Name or pathname of text file to export to:" with FILENAME
- if it is empty then CleanExit
- put it into FILENAME
- End GetFileName
-
- On OpenFile
- global FILENAME,CONTENTS
- open file FILENAME
- read from file FILENAME for 100
- close file FILENAME
- if it is not empty then
- repeat until it is "Replace"
- answer "That file already exists..." with "Replace" or "Cancel"
- if it is "Cancel" then GetFileName
- else if it is "Replace" then open file FILENAME
- else CleanExit
- end repeat
- else
- open file FILENAME
- end if
- End OpenFile
-
- On GetFieldData
- global FIELDNAMES,CONTENTS,FILENAME
- set cursor to 4
- put empty into CONTENTS
- if FIELDNAMES is empty then CleanExit
- put id of this background into backtemp
- set lockScreen to true
- go first card of this background
- put id of this card into cardtemp
- repeat
- if id of this background is backtemp then
- repeat with count = 1 to the number of lines in FIELDNAMES
- do "put" && line count of FIELDNAMES && "& return after CONTENTS"
- if number of chars in CONTENTS > 50000 then
- write CONTENTS to file FILENAME
- put empty into CONTENTS
- end if
- end repeat
- go next card of this background
- end if
- if id of this card is cardtemp then exit repeat
- end repeat
- write CONTENTS to file FILENAME
- set lockScreen to false
- End GetFieldData
-
- On Dialog
- global FIELDNAMES
- if the number of background fields is 0 then
- answer "No bkgnd fields on this card to export"
- CleanExit
- end if
- answer "Export which background fields:" with "All" or "Some" or "Cancel"
- if it is "All" then
- set cursor to 4
- repeat with count = 1 to the number of background fields
- put (name of background field count) & return after FIELDNAMES
- end repeat
- else if it is "Some" then
- repeat with count = 1 to the number of background fields
- answer "Export field" && count & ":" && name of background field count with "Yes" or "No" or "Done"
- if it is "Yes" then put (name of background field count) & return after FIELDNAMES
- else if it is "No" then next repeat
- else exit repeat
- end repeat
- else CleanExit
- if FIELDNAMES is empty then CleanExit
- End Dialog
-
- on CleanExit
- global LEVELMEMORY,STARTCARD
- choose browse tool
- go to card id STARTCARD
- set the userLevel to LEVELMEMORY
- set lockScreen to false
- set lockMessages to false
- exit to hypercard
- end CleanExit
-
-
-
-
- -- part 35 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=257 top=243 right=266 bottom=355
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Export Data
- ----- HyperTalk script -----
- --Export Data Button by Gary Bond
- --Copyright 1987 by Apple Computer, Inc.
- --Rev 3.6
-
- On MouseUp
- global LEVELMEMORY,STARTCARD,FIELDNAMES,FILENAME
- put empty into FIELDNAMES
- put the userLevel into LEVELMEMORY
- set userLevel to 5
- set lockMessages to true
- put short id of this card into STARTCARD
- Dialog
- GetFilename
- OpenFile
- GetFieldData
- close file FILENAME
- CleanExit
- End MouseUp
-
- On GetFileName
- global FILENAME
- ask "Name or pathname of text file to export to:" with FILENAME
- if it is empty then CleanExit
- put it into FILENAME
- End GetFileName
-
- On OpenFile
- global FILENAME,CONTENTS
- open file FILENAME
- read from file FILENAME for 100
- close file FILENAME
- if it is not empty then
- repeat until it is "Replace"
- answer "That file already exists..." with "Replace" or "Cancel"
- if it is "Cancel" then GetFileName
- else if it is "Replace" then open file FILENAME
- else CleanExit
- end repeat
- else
- open file FILENAME
- end if
- End OpenFile
-
- On GetFieldData
- global FIELDNAMES,CONTENTS,CONTINUEFLAG,FILENAME
- put false into CONTINUEFLAG
- put empty into delimiters
- if number of background fields is 1 then
- answer "When exporting a single field..." with "More"
- answer "use the same field and record delimiter!" with "OK"
- end if
- answer "Use Tab and Return as delimiters?" with "Yes" or "Other" or "Cancel"
- if it is "Yes" then put "9,13" into delimiters
- else if it is "Other" then
- repeat until it < 256 and it > 0
- ask "Enter an Ascii FIELD separator (0-255):" with 9
- if it is empty then CleanExit close
- end repeat
- put it into item 1 of delimiters
- put 0 into it
- repeat until it < 256 and it > 0
- ask "Enter an Ascii RECORD separator (0-255):" with 13
- if it is empty then CleanExit close
- end repeat
- put it into item 2 of delimiters
- else CleanExit close
- set cursor to 4
- if FIELDNAMES is empty then CleanExit close
- put empty into CONTENTS
- put id of this background into backtemp
- set lockScreen to true
- go first card of this background
- put id of this card into cardtemp
- repeat
- if id of this background is backtemp then
- repeat with count = 1 to the number of lines in FIELDNAMES
- do "get" && line count of FIELDNAMES
- put it into temp
- if numToChar(item 2 of delimiters) is in temp and CONTINUEFLAG is false then
- answer "Found record delimiter:" && item 2 of delimiters && "in field data..." with "Continue" or "Exit"
- if it is "Continue" then
- put true into CONTINUEFLAG
- set cursor to 4
- else CleanExit close
- end if
- put temp after CONTENTS
- put numToChar(item 1 of delimiters) after CONTENTS
- end repeat
- put numToChar(item 2 of delimiters) into last character of CONTENTS
- go next card of this background
- end if
- write CONTENTS to file FILENAME
- put empty into contents
- if id of this card is cardtemp then exit repeat
- end repeat
- set lockScreen to false
- End GetFieldData
-
- On Dialog
- global FIELDNAMES
- if the number of background fields is 0 then
- answer "No bkgnd fields on this card to export"
- CleanExit
- end if
- answer "Export which background fields:" with "All" or "Some" or "Cancel"
- if it is "All" then
- set cursor to 4
- repeat with count = 1 to the number of background fields
- put (name of background field count) & return after FIELDNAMES
- end repeat
- else if it is "Some" then
- repeat with count = 1 to the number of background fields
- answer "Export field" && count & ":" && name of background field count with "Yes" or "No" or "Done"
- if it is "Yes" then put (name of background field count) & return after FIELDNAMES
- else if it is "No" then next repeat
- else exit repeat
- end repeat
- else CleanExit
- if FIELDNAMES is empty then CleanExit
- End Dialog
-
- on CleanExit
- global LEVELMEMORY,STARTCARD,FILENAME
- if param(1) is "close" then close file FILENAME
- choose browse tool
- go to card id STARTCARD
- set the userLevel to LEVELMEMORY
- set lockScreen to false
- set lockMessages to false
- exit to hypercard
- end CleanExit
-
-
-
-
- -- part contents for background part 1
- ----- text -----
- Text Buttons